-- local jinti = fk.CreateSkill {
--   name = "wk_heg__jinti_zhuoda",
-- }

-- Fk:loadTranslationTable{
--   ["wk_heg__jinti_zhuoda"] = "进替",
--   [":wk_heg__jinti_zhuoda"] = "当你受到伤害后，你可以摸X张牌（X为此技能发动次数，至多为你体力上限），然后你选择一项：1.弃置一张红桃牌；2.使用一张装备牌；3.重置此技能。",

--   ["@wk_heg__jinti_zhuoda"] = "进替",
-- }

-- jinti:addEffect(fk.Damaged, {
--   can_trigger = function (self, event, target, player, data)
--     return player:hasSkill(jinti.name) and player == target
--   end,
--   on_use = function (self, event, target, player, data)
--     local room = player.room
--     if player:getMark("@wk_heg__jinti_zhuoda") < player.maxHp then
--       room:addPlayerMark(player, "@wk_heg__jinti_zhuoda", 1)
--     end
--     local num = player:getMark("@wk_heg__jinti_zhuoda")
--     player:drawCards(math.max(num, 1), jinti.name)
--     local heart_card = {}
--     local equip_card = {}
--     for _, cid in ipairs(player:getCardIds("h")) do
--       local card = Fk:getCardById(cid)
--       if card.suit == Card.Heart then
--         table.insert(heart_card, cid)
--       elseif card.type == Card.TypeEquip then
--         table.insert(equip_card, cid)
--       end
--     end
--     local choices = {"wk_heg__jinti_no"}
--     if #heart_card > 0 then
--       table.insert(choices, "wk_heg__jinti_heart")
--     end
--     if #equip_card > 0 then
--       table.insert(choices, "wk_heg__jinti_spade")
--     end
--     local all_choices = {"wk_heg__jinti_no", "wk_heg__jinti_heart", "wk_heg__jinti_spade"}
--     local choice = room:askToChoice(player, {choices = choices, all_choices = all_choices, skill_name = jinti.name})
--     if choice == "wk_heg__jinti_no" then
--       room:setPlayerMark(player, "@wk_heg__jinti_zhuoda", 0)
--     elseif choice == "wk_heg__jinti_heart" then
--       if #room:askToDiscard(player, {
--         min_num = 1,
--         max_num = 1,
--         include_equip = true,
--         skill_name = jinti.name,
--         pattern = ".|.|heart",
--         prompt = "wk_heg__jinti_dis",
--         cancelable = false,
--       }) == 0 then
--         room:setPlayerMark(player, "@wk_heg__jinti_zhuoda", 0)
--       end
--     else
--       local use = room:askToPlayCard(player, {
--         skill_name = jinti.name,
--         prompt = "#wk_heg__jinti_use",
--         cancelable = false,
--         pattern = ".|.|.|.|.|equip",
--         extra_data = {
--           bypass_times = true,
--           extraUse = true,
--         },
--         skip = true,
--       })
--       if use then
--         room:useCard(use)
--       else
--         room:setPlayerMark(player, "@wk_heg__jinti_zhuoda", 0)
--       end
--     end
--   end,
-- })

-- return jinti